<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  
  <title>AQS源码笔记 | gdme1320 的笔记</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Table of Contents   Inner Class Node Inner Class ConditionObject CAS方法  boolean compareAndSetHead(Node update) boolean compareAndSetTail(Node expect, Node update) boolean compareAndSetSetWaitStatus">
<meta property="og:type" content="article">
<meta property="og:title" content="AQS源码笔记">
<meta property="og:url" content="http://gdme1320.gitee.com/java/concurrent/aqs-src/index.html">
<meta property="og:site_name" content="gdme1320 的笔记">
<meta property="og:description" content="Table of Contents   Inner Class Node Inner Class ConditionObject CAS方法  boolean compareAndSetHead(Node update) boolean compareAndSetTail(Node expect, Node update) boolean compareAndSetSetWaitStatus">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2022-03-23T09:59:41.471Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="AQS源码笔记">
<meta name="twitter:description" content="Table of Contents   Inner Class Node Inner Class ConditionObject CAS方法  boolean compareAndSetHead(Node update) boolean compareAndSetTail(Node expect, Node update) boolean compareAndSetSetWaitStatus">
  
    <link rel="alternate" href="/atom.xml" title="gdme1320 的笔记" type="application/atom+xml">
  
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">

  <link rel="stylesheet" href="/css/styles.css">
  <link rel="stylesheet" href="/css/docs.min.css">
  

</head>
</html>
<body>
  <nav class="navbar navbar-inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="main-menu-navbar">
      <ul class="nav navbar-nav">
        
          <li><a class href="/index.html">Home</a></li>
        
          <li><a class href="/archives/">Archives</a></li>
        
      </ul>

      <!--
      <ul class="nav navbar-nav navbar-right">
        
          <li><a href="/atom.xml" title="RSS Feed"><i class="fa fa-rss"></i></a></li>
        
      </ul>
      -->
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

  <div class="container bs-docs-container">
  
    <div class="row">
        <div class="col-sm-8 blog-main">
          <article id="post-java/concurrent/aqs-src" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 class="article-title" itemprop="name">
      AQS源码笔记
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/java/concurrent/aqs-src/" class="article-date"><time datetime="2022-03-23T09:59:41.471Z" itemprop="datePublished">2022-03-23</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/java/">java</a> / <a class="article-category-link" href="/categories/java/concurrent/">concurrent</a>
  </div>


  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org8b1c6f4">Inner Class Node</a></li>
<li><a href="#org7c431cb">Inner Class ConditionObject</a></li>
<li><a href="#orge006176">CAS方法</a>
<ul>
<li><a href="#org8c2538c">boolean compareAndSetHead(Node update)</a></li>
<li><a href="#org62a154e">boolean compareAndSetTail(Node expect, Node update)</a></li>
<li><a href="#orgd5ca796">boolean compareAndSetSetWaitStatus(Node node, int expect, int update)</a></li>
<li><a href="#org655402a">boolean compareAndSetNext(Node node, Node expect, Node update)</a></li>
</ul>
</li>
<li><a href="#org5009f52">锁方法</a>
<ul>
<li><a href="#orge353032">void acquire(long arg)</a>
<ul>
<li><a href="#orge878ca5">boolean tryAcquire(long arg)</a></li>
<li><a href="#org8e748bb">Node addWaiter(Node mode)</a></li>
<li><a href="#org4970edd">boolean acquireQueued(final Node node, long arg)</a></li>
</ul>
</li>
<li><a href="#org57d5223">boolean release(long arg)</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-org8b1c6f4">
<h2 id="org8b1c6f4">Inner Class Node</h2>
<div class="outline-text-2" id="text-org8b1c6f4">
<p>
表示双向链表中的单个结点。主要的字段：
</p>
<ul class="org-ul">
<li>前后结点的指针（数据结构 - 链表）</li>
<li>thread 字段，线程进入等待队列时，被包装成Node，这个字段就是那个线程。</li>
<li>waitStatus 字段表示一个线程是否应该阻塞。AQS中实现的等待队列是CLH的变体，一个结点上的线程的相关控制信息被保存在它的前继结点上。当结点的前继结点释放的时候，这个结点被通知，
<ul class="org-ul">
<li>SIGNAL 当前结点的后结点是（或者即将）阻塞，所以当前线程在释放或者取消时，需要唤醒下个结点。</li>
<li>CANCELLED 当前结点由于超时或中断，面被取消。</li>
<li>CONDITION 当前结点正位于条件队列中，</li>
<li>PROPAGATE</li>
<li>0 其他，不是以上所有状态</li>
</ul></li>
<li>nextWaiter 链接到下个条件等待的结点</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-org7c431cb">
<h2 id="org7c431cb">Inner Class ConditionObject</h2>
</div>
<div class="outline-2" id="outline-container-orge006176">
<h2 id="orge006176">CAS方法</h2>
<div class="outline-text-2" id="text-orge006176">
<p>
这个类中用到了Unsafe类的CAS方法进行并发控制。
</p>
</div>
<div class="outline-3" id="outline-container-org8c2538c">
<h3 id="org8c2538c">boolean compareAndSetHead(Node update)</h3>
<div class="outline-text-3" id="text-org8c2538c">
<p>
如果链表是空，则设置链表头，代码如下：
</p>
<div class="org-src-container">
<pre class="src src-java">Unsafe.compareAndSwapObject(<span style="font-weight: bold;">this</span>, <span style="font-weight: bold; text-decoration: underline;">headOffset</span>, <span style="font-weight: bold; text-decoration: underline;">null</span>, <span style="font-weight: bold; text-decoration: underline;">update</span>);
</pre>
</div>
<p>
前两个参数，用于定位要比较的数据。this表示数据在当前对象中，headOffset是类的静态变量，在类的static块中被初始化值。
headOffset的意思是：成员变量head相对于类的内存地址偏移（大概就这个意思吧）。
第三个参数，是期望的值，第四个参数是新值。
所以这个方法的意思是：比较对象成员变量head是否为空，如果是则修改为update。如果比较失败，则返回失败。
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org62a154e">
<h3 id="org62a154e">boolean compareAndSetTail(Node expect, Node update)</h3>
<div class="outline-text-3" id="text-org62a154e">
<p>
同上。注意第一个参数是期望的当前值。
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgd5ca796">
<h3 id="orgd5ca796">boolean compareAndSetSetWaitStatus(Node node, int expect, int update)</h3>
<div class="outline-text-3" id="text-orgd5ca796">
<p>
比较然后设置Node对象中waitStatus的值。
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org655402a">
<h3 id="org655402a">boolean compareAndSetNext(Node node, Node expect, Node update)</h3>
<div class="outline-text-3" id="text-org655402a">
<p>
比较然后设置Node对象中next变量的值。
</p>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org5009f52">
<h2 id="org5009f52">锁方法</h2>
<div class="outline-text-2" id="text-org5009f52">
</div>
<div class="outline-3" id="outline-container-orge353032">
<h3 id="orge353032">void acquire(long arg)</h3>
<div class="outline-text-3" id="text-orge353032">
<p>
这是加锁的方法，方法的代码如下：
</p>
<div class="org-src-container">
<pre class="src src-java"><span style="font-weight: bold;">if</span>(!tryAcquire(arg) &amp;&amp;
   acquireQueued(addWaiter(<span style="font-weight: bold; text-decoration: underline;">Node</span>.EXCLUSIVE), arg)) {
    selfInterrupt();
}
</pre>
</div>
<p>
这个方法以独占模式获取锁，无视中断。这个方法首先调用  tryAcquire  方法，如果成功则直接返回。失败则入队列等待。
</p>
</div>
<div class="outline-4" id="outline-container-orge878ca5">
<h4 id="orge878ca5">boolean tryAcquire(long arg)</h4>
<div class="outline-text-4" id="text-orge878ca5">
<p>
这个方法需要由子类去实现
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8e748bb">
<h4 id="org8e748bb">Node addWaiter(Node mode)</h4>
<div class="outline-text-4" id="text-org8e748bb">
<p>
如果  tryAcquire  失败，则调用这个方法。这个方法将当前线程包装到Node结点中，然后通过CAS方法，将结点入队列。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org4970edd">
<h4 id="org4970edd">boolean acquireQueued(final Node node, long arg)</h4>
<div class="outline-text-4" id="text-org4970edd">
<p>
调用了addWaiter之后，这个方法被调用。方法中使用一个循环，（TODO 进行队列等待？）
</p>
<p>
方法内又调用了下面的方法。
</p>
</div>
<ul class="org-ul">
<li><a id="org20617e8"></a>boolean shouldParkAfterFailedAcquire(Node pred, Node node)<br>
<div class="outline-text-5" id="text-org20617e8">
<p>
对失败获取锁的结点进行检查并更新状态。如果线程应当阻塞，则返回true。参数pred是node的前结点（两个参数的值有要求，需要pred = node.pred）
这个方法的主要流程如下：
</p>
<pre class="example">
if pred.waitStatus is SIGNAL:
    return true
if pred.waitStatus &gt; 0: # 已取消的状态
    则从队列中移除pred，然后再向前找结点，直到找到不是取消的。
else: # 其他状态
    通过CAS方法将其设置为SIGNAL。
return false
</pre>
</div>
</li>
<li><a id="org21db5ea"></a>boolean parkAndCheckInterrupt()<br>
<div class="outline-text-5" id="text-org21db5ea">
<p>
禁用当前线程，然后返回它是否被中断了。
</p>
</div>
</li>
</ul>
</div>
</div>
<div class="outline-3" id="outline-container-org57d5223">
<h3 id="org57d5223">boolean release(long arg)</h3>
<div class="outline-text-3" id="text-org57d5223">
<p>
这是解锁的方法，方法的代码如下：
</p>
<div class="org-src-container">
<pre class="src src-java"><span style="font-weight: bold;">if</span> (tryRelease(arg)) {
    <span style="font-weight: bold; text-decoration: underline;">Node</span> <span style="font-weight: bold; font-style: italic;">h</span> = head;
    <span style="font-weight: bold;">if</span> (h != <span style="font-weight: bold; text-decoration: underline;">null</span> &amp;&amp; h.waitStatus != 0) 
        unparkSuccessor(h);
    <span style="font-weight: bold;">return</span> <span style="font-weight: bold; text-decoration: underline;">true</span>;
}
<span style="font-weight: bold;">return</span> <span style="font-weight: bold; text-decoration: underline;">false</span>;
</pre>
</div>
<p>
首先调用  tryRelease  方法，这个方法由子类实现。如果  tryRelease  成功，则解锁链表中的下个结点。
解锁就是调用Unsafe.unpark方法，激活node结点中保存的线程。
</p>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer" target="_blank" rel="noopener">Validate</a></p>
</div>

      
    </div>

    
      

    

    <footer class="article-footer">
      <a data-url="http://gdme1320.gitee.com/java/concurrent/aqs-src/" data-id="cl13eo7md00e0hjv4hlboj5tq" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      

    </footer>
  </div>
  
    
<ul id="article-nav" class="nav nav-pills nav-justified">
  
  <li role="presentation">
    <a href="/java/concurrent/clh-mcs/" id="article-nav-older" class="article-nav-link-wrap">
      <i class="fa fa-chevron-left pull-left"></i>
      <span class="article-nav-link-title">CLH和MCS算法</span>
    </a>
  </li>
  
  
  <li role="presentation">
    <a href="/linux/tcp/network-tcp-performance-turning-with-sysctl/" id="article-nav-newer" class="article-nav-link-wrap">
      <span class="article-nav-link-title">【翻译】Sysctl调节Linux网络性能</span>
      <i class="fa fa-chevron-right pull-right"></i>
    </a>
  </li>
  
</ul>


  
</article>




        </div>
        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
          
  
  <div class="sidebar-module">
    <h4>Categories</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/apps/">apps</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/architecture/">architecture</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/">devops</a><span class="sidebar-module-list-count">10</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubectl/">kubectl</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubernetes/">kubernetes</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/">dotnet</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/entityframework/">entityframework</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/elasticsearch/">elasticsearch</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/">emacs</a><span class="sidebar-module-list-count">4</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/org-mode/">org-mode</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/git/">git</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/graphql/">graphql</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/groovy/">groovy</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/">java</a><span class="sidebar-module-list-count">52</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/concurrent/">concurrent</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/jackson/">jackson</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/shiro/">shiro</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring/">spring</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/">spring-amqp</a><span class="sidebar-module-list-count">5</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-security/">spring-security</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/">thymeleaf</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/maven/">maven</a><span class="sidebar-module-list-count">1</span></li></ul></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/jenkins/">jenkins</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/journal/">journal</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/js/">js</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/">linux</a><span class="sidebar-module-list-count">35</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kde/">kde</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/">kross</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/ktorrent-scripts/">ktorrent-scripts</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/shell/">shell</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/tcp/">tcp</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/lisp/">lisp</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mongodb/">mongodb</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mssql/">mssql</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mysql/">mysql</a><span class="sidebar-module-list-count">12</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/nginx/">nginx</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/node/">node</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/">postgresql</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/client/">client</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/python/">python</a><span class="sidebar-module-list-count">19</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/regex/">regex</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/rfc/">rfc</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/vim/">vim</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/windows/">windows</a><span class="sidebar-module-list-count">7</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tags</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ReentrantLock/">ReentrantLock</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/nohup/">nohup</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/pandoc/">pandoc</a><span class="sidebar-module-list-count">1</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tag Cloud</h4>
    <p class="tagcloud">
      <a href="/tags/ReentrantLock/" style="font-size: 10px;">ReentrantLock</a> <a href="/tags/nohup/" style="font-size: 10px;">nohup</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a>
    </p>
  </div>


  
  <div class="sidebar-module">
    <h4>Archives</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2919/06/">June 2919</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/03/">March 2022</a><span class="sidebar-module-list-count">58</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/01/">January 2022</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/11/">November 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/10/">October 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/04/">April 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/03/">March 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/02/">February 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/01/">January 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/12/">December 2020</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/11/">November 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/10/">October 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/09/">September 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/07/">July 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/06/">June 2020</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/04/">April 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/03/">March 2020</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/02/">February 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/01/">January 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/12/">December 2019</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/11/">November 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/10/">October 2019</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/09/">September 2019</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/08/">August 2019</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/07/">July 2019</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/06/">June 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/05/">May 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/04/">April 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/03/">March 2019</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/02/">February 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/01/">January 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/11/">November 2018</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/10/">October 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/08/">August 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/07/">July 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/06/">June 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/03/">March 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/07/">July 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/06/">June 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/04/">April 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/05/">May 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/1970/01/">January 1970</a><span class="sidebar-module-list-count">9</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Recents</h4>
    <ul class="sidebar-module-list">
      
        <li>
          <a href="/java/acessing-generic-types-at-runtime/">获取泛型类型</a>
        </li>
      
        <li>
          <a href="/linux/shell/bash_cgi/">Script for Shell Parsing Parameters</a>
        </li>
      
        <li>
          <a href="/linux/shell/shell-script/">Shell Script Getting Start</a>
        </li>
      
        <li>
          <a href="/linux/tcp/network-tcp-performance-turning-with-sysctl/">【翻译】Sysctl调节Linux网络性能</a>
        </li>
      
        <li>
          <a href="/java/concurrent/aqs-src/">AQS源码笔记</a>
        </li>
      
    </ul>
  </div>



        </div>
    </div>
  </div>
  <footer class="blog-footer">
  <div class="container">
    <div id="footer-info" class="inner">
      &copy; 2022 gdme1320<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

  

<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script> -->

<script src="/js/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>



<script src="/js/script.js"></script>

</body>
</html>
